#include "ray.h"

Ray::Ray(const Point &source, const Vector &direction) : source_(source), dir_(direction)
{
}

Ray::Ray(const Ray &r) : source_(r.source()), dir_(r.dir())
{

}

Ray& Ray::operator=(const Ray &r)
{
    if( this != &r ) {
        source_ = r.source();
        dir_ = r.dir();
    }

    return *this;
}

const Point& Ray::source() const
{
    return source_;
}

const Vector& Ray::dir() const
{
    return dir_;
}
